//
// MATLAB Compiler: 4.11 (R2009b)
// Date: Thu Oct 21 20:57:50 2010
// Arguments: "-B" "macro_default" "-C" "-W" "cpplib:libfilter" "-T" "link:lib"
// "initialize_x_and_p" "ekf_filter" "GenerateObs" "ekf_prediction"
// "ekf_update_vw" 
//

#ifndef __libfilter_h
#define __libfilter_h 1

#if defined(__cplusplus) && !defined(mclmcrrt_h) && defined(__linux__)
#  pragma implementation "mclmcrrt.h"
#endif
#include "mclmcrrt.h"
#include "mclcppclass.h"
#ifdef __cplusplus
extern "C" {
#endif

#if defined(__SUNPRO_CC)
/* Solaris shared libraries use __global, rather than mapfiles
 * to define the API exported from a shared library. __global is
 * only necessary when building the library -- files including
 * this header file to use the library do not need the __global
 * declaration; hence the EXPORTING_<library> logic.
 */

#ifdef EXPORTING_libfilter
#define PUBLIC_libfilter_C_API __global
#else
#define PUBLIC_libfilter_C_API /* No import statement needed. */
#endif

#define LIB_libfilter_C_API PUBLIC_libfilter_C_API

#elif defined(_HPUX_SOURCE)

#ifdef EXPORTING_libfilter
#define PUBLIC_libfilter_C_API __declspec(dllexport)
#else
#define PUBLIC_libfilter_C_API __declspec(dllimport)
#endif

#define LIB_libfilter_C_API PUBLIC_libfilter_C_API


#else

#define LIB_libfilter_C_API

#endif

/* This symbol is defined in shared libraries. Define it here
 * (to nothing) in case this isn't a shared library. 
 */
#ifndef LIB_libfilter_C_API 
#define LIB_libfilter_C_API /* No special import/export declaration */
#endif

extern LIB_libfilter_C_API 
bool MW_CALL_CONV libfilterInitializeWithHandlers(
       mclOutputHandlerFcn error_handler, 
       mclOutputHandlerFcn print_handler);

extern LIB_libfilter_C_API 
bool MW_CALL_CONV libfilterInitialize(void);

extern LIB_libfilter_C_API 
void MW_CALL_CONV libfilterTerminate(void);



extern LIB_libfilter_C_API 
void MW_CALL_CONV libfilterPrintStackTrace(void);

extern LIB_libfilter_C_API 
bool MW_CALL_CONV mlxInitialize_x_and_p(int nlhs, mxArray *plhs[], int nrhs, mxArray 
                                        *prhs[]);

extern LIB_libfilter_C_API 
bool MW_CALL_CONV mlxEkf_filter(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);

extern LIB_libfilter_C_API 
bool MW_CALL_CONV mlxGenerateObs(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);

extern LIB_libfilter_C_API 
bool MW_CALL_CONV mlxEkf_prediction(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);

extern LIB_libfilter_C_API 
bool MW_CALL_CONV mlxEkf_update_vw(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[]);

extern LIB_libfilter_C_API 
long MW_CALL_CONV libfilterGetMcrID();


#ifdef __cplusplus
}
#endif

#ifdef __cplusplus

/* On Windows, use __declspec to control the exported API */
#if defined(_MSC_VER) || defined(__BORLANDC__)

#ifdef EXPORTING_libfilter
#define PUBLIC_libfilter_CPP_API __declspec(dllexport)
#else
#define PUBLIC_libfilter_CPP_API __declspec(dllimport)
#endif

#define LIB_libfilter_CPP_API PUBLIC_libfilter_CPP_API

#else

#if !defined(LIB_libfilter_CPP_API)
#if defined(LIB_libfilter_C_API)
#define LIB_libfilter_CPP_API LIB_libfilter_C_API
#else
#define LIB_libfilter_CPP_API /* empty! */ 
#endif
#endif

#endif

extern LIB_libfilter_CPP_API void MW_CALL_CONV initialize_x_and_p(int nargout, mwArray& x_k_k, mwArray& p_k_k, mwArray& filter, const mwArray& v_0, const mwArray& std_v_0, const mwArray& w_0, const mwArray& std_w_0);

extern LIB_libfilter_CPP_API void MW_CALL_CONV ekf_filter(int nargout, mwArray& f, const mwArray& x_k_k, const mwArray& p_k_k, const mwArray& sigma_a, const mwArray& sigma_alpha, const mwArray& sigma_imn, const mwArray& type);

extern LIB_libfilter_CPP_API void MW_CALL_CONV GenerateObs(int nargout, mwArray& xr_k, mwArray& z_k, const mwArray& xr_k_in1, const mwArray& delta_t, const mwArray& type, const mwArray& std_a, const mwArray& std_alpha, const mwArray& std_vw);

extern LIB_libfilter_CPP_API void MW_CALL_CONV ekf_prediction(int nargout, mwArray& f, const mwArray& f_in1, const mwArray& delta_t);

extern LIB_libfilter_CPP_API void MW_CALL_CONV ekf_update_vw(int nargout, mwArray& filter, const mwArray& filter_in1, const mwArray& v, const mwArray& w, const mwArray& std_vw);

#endif
#endif
